package com.ruoyi.goods.mapper;

import com.ruoyi.goods.domain.Brand;
import com.ruoyi.goods.domain.BrandPerson;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

@Repository
public interface BrandMapper {

    public int getBrandIdByBrandPersonId(@Param("brandPersonId") int brandPersonId);

    // 查询品牌列表
    public List<Brand> getBrandList(@Param("deptId") int deptId);

    public int getBrandByNo(@Param("code") String code);

    // 查询品牌子分类列表
    public List<BrandPerson> getBrandPersonList(@Param("brandId") int brandId);

    // 新增品牌数据
    public int insertBrand(Brand brand);

    // 新增品牌子类数据
    public int insertBrandPerson(BrandPerson branchPerson);

    //  修改品牌信息
    public int updateBrand(Brand brand);

    //  修改品牌信息子分类
    public int updateBrandPerson(BrandPerson branchPerson);

    public int getBrandPersonCount(@Param("brandId") int brandId);

    public int delBrandByIds(@Param("ids") Long[] ids);

    public int delBrandPersonByIds(@Param("ids") Long[] ids);

    public List<Brand> getBrandAndBrandPersonList(@Param("brands") List<Brand> brands);

    public BrandPerson getBrandPersonByCode(@Param("code") String code);

    public int getBrandByIdReturnId(@Param("id") int id);

    public int getBrandCountByCode(@Param("code") String code, @Param("id") int id);

    public int getBrandPersonCountByCode(@Param("code") String code, @Param("id") int id);

    public Brand getBrandById(@Param("id") int id);

    public BrandPerson getBrandPersonById(@Param("id") int id);
}
